const state = {
  isCommonCategory: true,              // 内置标签库 ：true, 自定义组： false
  checkedCustomGroup: {},                  // 点击了自定义组
  treeIdForLog2world: '',                    // 0612 当前点击tree的id 
  treeIdForWorldsim: '',                    // 0612 当前点击tree的id 
}

const mutations = {

  SET_IS_COMMON_CATEGORY:(state,data) => {
    state.isCommonCategory = data
  },
  SET_CHECKED_CUSTOM_GROUP:(state,data) => {
    state.checkedCustomGroup = data
  },
  SET_TREE_ID_FOR_LOG2WORLD:(state,data) => {
    state.treeIdForLog2world = data
  },
  SET_TREE_ID_FOR_WORLDSIM:(state,data) => {
    state.treeIdForWorldsim = data
  },

} 

const actions = {
  updateIsCommonCategory({commit},data){
    commit('SET_IS_COMMON_CATEGORY',data)
  },
  updateCheckedCustomGroup({commit},data){
    commit('SET_CHECKED_CUSTOM_GROUP',data)
  },
  // 0612
  updateTreeIdForLog2world({commit},data){
    commit('SET_TREE_ID_FOR_LOG2WORLD',data)
  },
  updateTreeIdForWorldsim({commit},data){
    commit('SET_TREE_ID_FOR_WORLDSIM',data)
  },
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}